﻿namespace SsisLdapSource.DirectoryServicesProtocolsExtensions
{
    using System.Collections.Generic;

    public class LdapMetaMapFactoryInitializationValues
    {
        private readonly AttributesWhichMayRequireExpansionGroup attributesWhichMayRequireExpansionGroup; 
        private readonly GuidEncodedAttributeGroup guidEncodedAttributeGroup;
        private readonly SidEncodedAttributeGroup sidEncodedAttributeGroup;
        private readonly Int64DateTimeEncodedAttributeGroup int64DateTimeEncodedAttributeGroup;
        private readonly StringEncodedIntAttributeGroup stringEncodedIntAttributeGroup;

        public LdapMetaMapFactoryInitializationValues()
        {
            guidEncodedAttributeGroup = new GuidEncodedAttributeGroup();
            int64DateTimeEncodedAttributeGroup = new Int64DateTimeEncodedAttributeGroup();
            sidEncodedAttributeGroup = new SidEncodedAttributeGroup();
            stringEncodedIntAttributeGroup = new StringEncodedIntAttributeGroup();
            attributesWhichMayRequireExpansionGroup = new AttributesWhichMayRequireExpansionGroup();
        }
        
        public LdapMetaMapFactoryInitializationValues(
            GuidEncodedAttributeGroup guidEncodedAttributeGroup,
            SidEncodedAttributeGroup sidEncodedAttributeGroup,
            Int64DateTimeEncodedAttributeGroup int64DateTimeEncodedAttributeGroup,
            StringEncodedIntAttributeGroup stringEncodedIntAttributeGroup,
            AttributesWhichMayRequireExpansionGroup attributesWhichMayRequireExpansionGroup)
            
        {
            this.guidEncodedAttributeGroup = guidEncodedAttributeGroup;
            this.int64DateTimeEncodedAttributeGroup = int64DateTimeEncodedAttributeGroup;
            this.sidEncodedAttributeGroup = sidEncodedAttributeGroup;
            this.stringEncodedIntAttributeGroup = stringEncodedIntAttributeGroup;
            this.attributesWhichMayRequireExpansionGroup = attributesWhichMayRequireExpansionGroup;
        }

        public List<string> AttributesWhichMayRequireExpansion
        {
            get { return attributesWhichMayRequireExpansionGroup.Members; }
        }

        public IEnumerable<string> Int64DateTimeEncodedAttributes
        {
            get { return int64DateTimeEncodedAttributeGroup.Members; } 
        }

        public IEnumerable<string> GuidEncodedBinaryAttributes
        {
            get { return guidEncodedAttributeGroup.Members; }
        }

        public IEnumerable<string> SidEncodedBinaryAttributes
        {
            get { return sidEncodedAttributeGroup.Members; } 
        }

        public IEnumerable<string> StringEncodedIntAttributes
        {
            get { return stringEncodedIntAttributeGroup.Members; }
        }
    }
}
